package org.dromara.business.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.business.domain.PlayHistory;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 统一播放记录视图对象 t_play_history
 *
 * @author Hao Tong Xue
 * @date 2025-04-21
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = PlayHistory.class)
public class PlayHistoryVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 播放记录ID
     */
    @ExcelProperty(value = "播放记录ID")
    private Long id;

    /**
     * 内容ID（视频/音频等）
     */
    @ExcelProperty(value = "内容ID", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "视=频/音频等")
    private Long contentId;

    /**
     * 内容类型：1-视频，2-音频
     */
    @ExcelProperty(value = "内容类型：1-视频，2-音频", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "content_type")
    private Integer contentType;

    /**
     * 本次播放时长（秒）
     */
    @ExcelProperty(value = "本次播放时长", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "秒=")
    private Integer playDuration;

    /**
     * 是否播放完成：0-未完成，1-完成
     */
    @ExcelProperty(value = "是否播放完成：0-未完成，1-完成", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "yes_no")
    private Integer isCompleted;

    /**
     * 观看次数（同内容同会话累计）
     */
    @ExcelProperty(value = "观看次数", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "同=内容同会话累计")
    private Integer watchCount;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


}
